Conditions | 3 |
Total Lines | 13 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import Field from "./Field"; |
||
28 | // should contain primary key names |
||
29 | // maybe add static model helper |
||
30 | if (!(this.model.ids().includes(`${modelValue?.id}`))) { |
||
31 | this.model.insert(modelValue); |
||
32 | } |
||
33 | }); |
||
34 | } |
||
35 | |||
36 | getRelationalFields(): ForeignKey[] { |
||
37 | return [new ForeignKey(this.foreignKey).setRelation(this)]; |
||
38 | } |
||
39 | |||
40 | tableSetup(table: TableInterface): void { |
||
41 | table.registerIndex(this.foreignKey); |
||
43 | } |